package com.boot.feign;

import com.boot.feign.fallback.ProductFeignClientFallBack;
import com.boot.product.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "service-product", fallback = ProductFeignClientFallBack.class)
public interface ProductFeignClient {
    @GetMapping("product/{id}")
    Product getProduct(@PathVariable Long id);
}
